package com.tcm.controller.front;

import com.tcm.entity.dto.CodeUpdateDto;
import com.tcm.entity.resp.R;
import com.tcm.service.OptionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Guqier
 * @version 1.0
 * @date 2023/9/17 21:37
 */
@RestController
@RequestMapping("/stu/options")
public class StuOptionsController {

    @Autowired
    private OptionsService optionsService;

    /**
     * 获取难易级别列表
     * @return 难易级别列表
     */
    @RequestMapping(value = "/diff", method = RequestMethod.GET)
    public R getDiffList(){
        List<CodeUpdateDto> itemDifficultyList = optionsService.getItemDifficultyList();
        return R.success(itemDifficultyList);
    }

}
